using UnityEngine;

namespace BCW
{
	public class SwitchTextureToAlphaMasked : MonoBehaviour
	{
		[SerializeField]
		private Texture alphaMask;

		private void Awake()
		{
			UIBasicSprite component = GetComponent<UITexture>();
			if ((bool)component)
			{
				component = component.ReplaceForCurrentPlatform();
				(component as UITextureMasked).textureAlpha = alphaMask;
			}
		}
	}
}
